home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java for 3D & VRML Worlds
/
Java for 3d and VRML Worlds.iso
/
examples
/
chap06
/
TV.wrl
< prev
next >
Wrap
Text File
|
1996-10-14
|
2KB
|
77 lines
#VRML V2.0 utf8
#
# TV
#
# TV body
Transform{
children[
Shape{
geometry IndexedFaceSet{
coord DEF COORD Coordinate{
point[
0 0 0, #0
15 0 0, #1
15 10 0, #2
0 10 0, #3
]
}
coordIndex [0, 1, 2, 3, -1]
solid FALSE
}
appearance Appearance{
texture DEF TV MovieTexture{
url "tv.jpg"
loop TRUE
startTime 0 # initially not playing
stopTime 1
}
}
}
]
}
# play button
Transform{
translation 2 -1 0
children[
Shape{geometry Box{size 4 1 0.1}},
DEF PLAY_BUTTON TouchSensor{}
]
}
Transform{
translation 1 -3 0
children[
Shape{
geometry Text{
string "Play"
fontStyle FontStyle{}
}
}
]
}
# stop button
Transform{
translation 13 -1 0
children[
Shape{geometry Box{size 4 1 0.1}},
DEF STOP_BUTTON TouchSensor{}
]
}
Transform{
translation 12 -3 0
children[
Shape{
geometry Text{
string "Stop"
fontStyle FontStyle{}
}
}
]
}
ROUTE PLAY_BUTTON.touchTime TO TV.set_startTime
ROUTE STOP_BUTTON.touchTime TO TV.set_stopTime